import { createRouter, createWebHistory } from "vue-router";
let routes= [
    {
        path: '/',
        name: 'login',
        //使用如下方式进行路由懒加载，防止白屏
        component: () => import('../view/login.vue')
    },
    {
        path: '/home',
        name: 'home',
        component: () => import('@/view/home.vue'),
      },
    {
    path: '/:catchAll(.*)',
    name: '404',
    component: () => import('../view/notFound.vue'),
    }
]

const router = createRouter({
    history: createWebHistory(),
    routes
})

export default router
